/*
 *
draw Rect
draw Circle
draw Ellipse

 */

#include <iostream>
using namespace std;
class Shape{
	public:
		virtual void draw(void) = 0;
};
class Rect:public Shape{
	public:
		void draw(void){
			cout << "draw Rect" << endl;
		}
};
class Circle: public Shape{
	public:
		void draw(void){
			cout << "draw Circle" << endl;
		}
};
class Ellipse: public Shape{
	public:
		void draw(void){
			cout << "draw Ellipse" << endl;
		}
};
int main(void){
	/*
	   Ellipse e;
	   e.draw();
	   e.Shape::draw();
	   */
	//Shape  s1; //error
	Shape *buf[128] = {0};
	buf[0] = new Rect;
	buf[1] = new Circle;
	buf[2] = new Ellipse;
	for(int i=0; buf[i] != NULL;  i++){
		buf[i]->draw();
	}
	return 0;
}
